import 'package:flutter/material.dart';
import 'package:getpro/getpro.dart';
import 'package:getx_base/pages/login_page/login_page.dart';
import 'pages/home_page/home_page.dart';

void main() {
  runApp(MyApp());
  UtilPro.transparentStatusBar();
}


class MyApp extends BaseApp<AppModel>{
   const MyApp({Key? key}) : super(key: key);

  @override
  Widget buildChild(BuildContext context) {
    return HomePage();
  }

  @override
  String get appTitle => "getBase";

  @override
  AppModel getModel() {
    return AppModel();
  }

}

class AppModel extends BaseModel{
  RxBool hasAuth = false.obs;


  @override
  Future<bool> initApp() async{
    appLoadingText.value = "正在验证登录信息...";
    await Future.delayed(Duration(seconds: 2));
    hasAuth.value = true;
    appLoadingText.value = "启动app";
    return true;
  }

}

